<form id="rankaddfm" method="post">
<table border="0" width="100%" cellspacing="1" cellpadding="5" bgcolor="#c4d3e1" style="text-align:left; line-height:18px;">							  
		  <tr bgcolor="#FFFFFF"> 
			<td style="line-height:30px;"  width="20%">名称：</td>
			<td width="80%"><input v-model="dataset.name" type="text" class="textbox-text validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入名称.."  required="true"></td>
		  </tr>
		  <tr bgcolor="#FFFFFF"> 
			<td style="line-height:30px;"  width="20%">积分最小值：</td>
			<td width="80%"><input type="text" v-model="dataset.min"  class="textbox-text validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入积分最小值.."   required="true"></td>
		  </tr>
		  <tr bgcolor="#FFFFFF"> 
			<td style="line-height:30px;"  width="20%">积分最大值：</td>
			<td width="80%"><input type="text" v-model="dataset.max"  class="textbox-text validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入积分最大值.."   required="true"></td>
		  </tr>
			<tr bgcolor="#FFFFFF">
				<td style="line-height:30px;"  width="20%">优惠比例：</td>
				<td width="80%"><input type="text" v-model="dataset.rate"  class="textbox-text validatebox-text textbox-prompt easyui-validatebox" placeholder="请输入优惠比例.."   required="true"> %</td>
			</tr>
</table>
</form>
<script>
    var rankaddVm =  new Vue({
        el: '#rankaddfm',
        data: {
            dataset:{},
        },
        methods:{
            submit: function(){                
                $.post('/admin/members/rankincrease', rankaddVm.dataset, function (data) {
                    if(data.ret==0){
                        $.messager.show({
                            title:'提示',
                            msg:data.msg,
                            timeout:3000,
                            showType:'slide'
                        });
                        $('#rankaddfm').form('clear');
                        $("#rankdlg").dialog('close');
                        $("#rank").datagrid('reload');
                    }else{
                        $.messager.alert('提示',data.msg,'warning');
                    }
                }, 'json');
            }
        }
    });
    $(function(){
        $('#rankaddsubmit').click(function(){
            rankaddVm.submit();
        })
    });
</script>